

<template>
  <!-- 积分商品列表组件 -->
  <view class="Mall4j integral-goods-item" :data-scoreprodid="prod.prodId" @tap="toScoreProdDet">
    <view class="img">
      <image :src="prod.pic" />
    </view>
    <view class="name">{{ prod.prodName }}</view>
    <view class="price">
      <image src="https://mall-1312577323.cos.ap-chengdu.myqcloud.com/mall/images/icon/integral-icon.png" class="icon" />
      <text class="red-word">{{ prod.scorePrice }}{{ ' ' + i18n.integral }}<text v-if="prod.price > 0">+{{ prod.price }}{{ i18n.yuan }}</text></text>
    </view>
    <view class="old-price">{{ i18n.marketValue }}￥{{ prod.oriPrice }}</view>
  </view>
  <!-- </view> -->
</template>

<script>

export default {

  components: {},
  props: {
    prod: Object
  },
  data () {
    return {}
  },

  computed: {
    i18n () {
      return this.$t('index')
    }
  },

  methods: {
    /**
     * 跳转积分商品详情
     */
    toScoreProdDet: function (e) {
      const prodId = e.currentTarget.dataset.scoreprodid
      uni.navigateTo({
        url: '/package-member-integral/pages/convert-prod-det/convert-prod-det?prodId=' + prodId
      })
    }
  }
}
</script>
<style>
@import "./index.css";
</style>
